package com.ruoyi.company.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.TreeEntity;

import java.util.List;

/**
 * 公司部门信息对象 t_company
 * 
 * @author suoge
 * @date 2025-10-21
 */
public class TCompany extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    /** 字典ID */
    private Integer id;

    /** 字典标题 */
    @Excel(name = "字典标题")
    private String title;

    /** 字典父级ID */
    @Excel(name = "字典父级ID")
    private Integer pid;

    /** 字典路径 */
    @Excel(name = "字典路径")
    private String url;

    private List<TCompany> children;

    public void setId(Integer id)
    {
        this.id = id;
    }

    public Integer getId()
    {
        return id;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setPid(Integer pid)
    {
        this.pid = pid;
    }

    public Integer getPid()
    {
        return pid;
    }

    public void setUrl(String url) 
    {
        this.url = url;
    }

    public String getUrl() 
    {
        return url;
    }

    @Override
    public List<TCompany> getChildren() {
        return children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("pid", getPid())
            .append("url", getUrl())
            .toString();
    }
}
